<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="../../../static/bootstrap.min.css" rel="stylesheet">
		<link href="../../../static/style-teacher.css" rel="stylesheet">
		<title>计算机网络综合实训</title>
	</head>
	<body>
		<div class="container">
			<div class="col-md-12 column">
				<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="#">华中科技大学</a>
					</div>
					<div class="collapse navbar-collapse" id="navbar-collapse">
						<ul class="nav navbar-nav">
							{% for class in classes%}
								<li {% if class[0] == aim %} class="active" {% endif %}><a href="/student/{{ class[0] }}/show_homework/">{{ class[1] }}</a></li>
							{% endfor %}
                                <li style="margin-left:50px"><a href="#">{{name}},你好</a></li>
						</ul>
					</div>
				</nav>
			</div>
			<div class="container-fluid">
				<div class="row">
					<div class="col-sm-3 col-md-2 sidebar">
						<ul class="nav nav-sidebar">
							<li><a href="/student/{{aim}}/show_homework">作业详情</a></li>
						</ul>
						<ul class="nav nav-sidebar">
							<li><a href="/student/{{aim}}/show_ppt">课件列表</a></li>
						</ul>
						<ul class="nav nav-sidebar">
							<li class="active"><a href="/student/{{aim}}/show_discussion">讨论区详情</a></li>
							<li><a href="/student/{{aim}}/add_discussion">添加讨论</a></li>
						</ul>
						<ul class="nav nav-sidebar">
							<li><a href="/student/{{aim}}/show_notice">公告详情</a></li>
						</ul>
						<ul class="nav nav-sidebar">
							<li><a href="/student/change_password">修改密码</a></li>
							<li><a href="/logout/thr">退出登陆</a></li>
						</ul>
					</div>
					<div class="col-md-offset-3 col-md-6">
						{% for message in get_flashed_messages() %}
							<div  class="flash" style="color:red"> {{ message }} </div>
						{% endfor %}
						{% if infos|length == 0%}
							<h3>暂无讨论！</h3>
						{% else %}
							{% for info in infos %}
								<div class="panel panel-info">
									<div class="panel-heading">
										{{ info[7] }}
										<em class="pull-right">{{info[3]}}</em>
									</div>
									<div class="panel-body">{{ info[6] }}
										{% if info[5] != '0' %}
											<img src="{{ info[5] }}" class="discussion-image">
										{% endif %}
									</div>
									<div class="panel-footer">
										<div class="btn-group" role="group">
											<button type="button" class="btn btn-default" onclick="location='/student/{{aim}}/show_discussion_detail/{{ info[0] }}'">查看详情</button>
										</div>
									</div>
								</div>
							{% endfor %}
							<nav>
								<ul class="pagination pull-right">
									{% for num in total %}
										<li {% if num == now %} class="active" {% endif %} ><a href="/teacher/{{aim}}/show_discussion/{{num}}">{{ num }}</a></li>
									{% endfor %}
								</ul>
							</nav>
						{% endif %}
					</div>
				</div>
			</div>
		</div>
		<script src="../../../static/jquery.min.js"></script>
		<script src="../../../static/bootstrap.min.js"></script>
	</body>
</html>
